package com.lastproject.ejb.entities;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.NamedQuery;

@Entity
@NamedQuery(name = "ConfidentialEmployee.findAll", query = "SELECT ce from ConfidentialEmployee ce")
public class ConfidentialEmployee extends Employee implements Serializable {

	private static final long serialVersionUID = -5655773560158965799L;
	
	private Float salary;
	private Float varPart;
	
	public ConfidentialEmployee() {
		
	}

	public Float getSalary() {
		return salary;
	}

	public void setSalary(Float salary) {
		this.salary = salary;
	}

	public Float getVarPart() {
		return varPart;
	}

	public void setVarPart(Float varPart) {
		this.varPart = varPart;
	}

//	@Override
//	public int hashCode() {
//		final int prime = 31;
//		int result = super.hashCode();
//		result = prime * result + ((salary == null) ? 0 : salary.hashCode());
//		result = prime * result + ((varPart == null) ? 0 : varPart.hashCode());
//		return result;
//	}
//
//	@Override
//	public boolean equals(Object obj) {
//		if (this == obj)
//			return true;
//		if (!super.equals(obj))
//			return false;
//		if (getClass() != obj.getClass())
//			return false;
//		ConfidentialEmployee other = (ConfidentialEmployee) obj;
//		if (salary == null) {
//			if (other.salary != null)
//				return false;
//		} else if (!salary.equals(other.salary))
//			return false;
//		if (varPart == null) {
//			if (other.varPart != null)
//				return false;
//		} else if (!varPart.equals(other.varPart))
//			return false;
//		return true;
//	}

	@Override
	public String toString() {
		return "ConfidentialEmployee [salary=" + salary + ", varPart="
				+ varPart + "]";
	}
	
	

}
